package com.qiangqiang.dbpool;

import java.sql.Connection;

/**  含有状态的数据库连接
 * Created by q on 2018/3/28.
 */
public class MyCon {

    /** 当前连接空闲 **/
    public static final int FREE=100;
    /** 当前连接繁忙 **/
    public static final int BUZY=101;
    /** 当前连接关闭 **/
    public static final int CLOSE=102;
    /** 持有的数据库连接 **/
    private Connection con;
    /** 状态 **/
    private int state=FREE;


    public MyCon(Connection con){
        this.con=con;
    }

    public Connection getCon() {
        return con;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }
}
